import bottle
from bottle import route, request
from random import Random

GREETINGS = [
      'Hello there, how are you?',
      'Hey you.',
      "What's up?",
      "Good to see you."
    ]

@route('/greeting')
def greeting():
  r = Random()
  return r.choice(GREETINGS)

@route("/")
def index():
  return """
    <html>
      <body>
        Things you can do:
        <a href="/greeting"> say hi. </a>
        <ul>
          %s
        </ul>
      </body>
    </html>
  """ % "\n".join("<li>%s</li>" % x for x in GREETINGS)

bottle.run(host="csundergrad.science.uoit.ca", port=9000)
